#ifndef MEMOFM_H
#define MEMOFM_H

#include <QtGui>

class SMemo: public QTextEdit
{
    Q_OBJECT
public:
    SMemo(QWidget *Parent);
    void keyPressEvent(QKeyEvent *e);
signals:
    void onCtrlEnter();
};
//---------------------------------------------------------------------------

class SMemoForm: public QWidget
{
    Q_OBJECT
private:
    QTextEdit *Log;
    SMemo *Memo;
    int minh;

protected:
    void resizeEvent(QResizeEvent *e);

public:
    SMemoForm(QWidget *Parent);
    ~SMemoForm();

    void acceptMessage(QString name, QString text, bool in);
    QString retrieveMessage();
    bool isReadyToSend();

private slots:
    void CtrlEnterTrap();

signals:
    void onCtrlEnter();
};

#endif // MEMOFM_H
